package org.linlinjava.litemall.admin.vo.order_manage;

import net.bytebuddy.implementation.bind.annotation.Default;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.time.LocalDateTime;

/**
 * @author wj
 * @date 2021/5/27 18:39
 */
public class OrderSelectVo {

    /**
     * 手机号
     */
//    @Pattern(regexp = "(/^\\s*$/g)|(^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$)",message = "手机号码格式不正确")
    @Pattern(regexp = "^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$",message = "手机号码格式不正确")
    private String phone;

    /**
     * 门店id
     */
    private Integer storeId;

    /**
     * 订单状态
     */
    private Integer orderStatus;

    /**
     * 开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    /**
     * 当前页码
     */
    @NotNull(message = "当前页码不能为空")
    private Integer pageNum;

    /**
     * 每页页数
     */
    @NotNull(message = "每页页数不能为空")
    private Integer pageSize;

    /**
     * 是否是售后列表  0-是  1-不是
     */
    private Integer isAfterSale=1;

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getStoreId() {
        return storeId;
    }

    public void setStoreId(Integer storeId) {
        this.storeId = storeId;
    }

    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    public LocalDateTime getStartTime() {
        return startTime;
    }

    public void setStartTime(LocalDateTime startTime) {
        this.startTime = startTime;
    }

    public LocalDateTime getEndTime() {
        return endTime;
    }

    public void setEndTime(LocalDateTime endTime) {
        this.endTime = endTime;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getIsAfterSale() {
        return isAfterSale;
    }

    public void setIsAfterSale(Integer isAfterSale) {
        this.isAfterSale = isAfterSale;
    }

    public OrderSelectVo() {
    }


    public OrderSelectVo(String phone, Integer storeId, Integer orderStatus, LocalDateTime startTime, LocalDateTime endTime, Integer pageNum, Integer pageSize, Integer isAfterSale) {
        this.phone = phone;
        this.storeId = storeId;
        this.orderStatus = orderStatus;
        this.startTime = startTime;
        this.endTime = endTime;
        this.pageNum = pageNum;
        this.pageSize = pageSize;
        this.isAfterSale = isAfterSale;
    }
}
